package com.mashibing.api.advice;

import com.mashibing.api.util.ResultVOUtil;
import com.mashibing.api.vo.ResultVO;
import com.mashibing.common.exception.ApiException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @ClassName:ApiExceptionHandler
 * @author:[开发者名称]
 * @Description:[类的功能描述]
 * @Date:2025/9/16/20:51
 * @Version:1.0
 */
@RestControllerAdvice
public class ApiExceptionHandler {
    @ExceptionHandler(ApiException.class)
    public ResultVO apiException(ApiException ex){
        return ResultVOUtil.error(ex);
    }
}
